package com.hc.mapper;

import com.hc.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper {

    @Insert("insert into user values (#{id},#{name},#{money})")
    void insert(User user);

    @Select("select * from user where id = #{id}")
    User findById(Long id);

    @Update("update user set money = #{money} where id = #{id}")
    void updateUser(User user);
}
